package com.stox.dto;

import java.util.List;

import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Setter;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@Data
@EqualsAndHashCode(callSuper=true)
@JsonIgnoreProperties(ignoreUnknown=true, value={"type"})
public class WatchList extends AbstractModel{
	private static final long serialVersionUID = 1L;
	
	public static final Type WATCHLIST_TYPE = new Type("Watchlist");
	
	public WatchList(){
		super(WATCHLIST_TYPE);
	}
	
	private Long parentId;

	@Setter(AccessLevel.NONE)
	private List<WatchList> children;
	
	@Setter(AccessLevel.NONE)
	private List<Scrip> entries;
	
	public Long getParentId(){
		return null == parentId ? 0 : parentId;
	}
}
